package com.example.hotelrear;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
<<<<<<< HEAD
=======
// @MapperScan("com.example.hotelrear")
>>>>>>> c858df565d55deb60e87bd48c878762d1fd5080a
public class HotelRearApplication {

	public static void main(String[] args) {
		SpringApplication.run(HotelRearApplication.class, args);
	}

	//允许http请求含有字符[]{}
	@Bean
	public TomcatServletWebServerFactory tomcatServletWebServerFactory (){

		// 修改内置的 tomcat 容器配置
		TomcatServletWebServerFactory tomcatServlet = new TomcatServletWebServerFactory();
		tomcatServlet.addConnectorCustomizers(
				(TomcatConnectorCustomizer) connector -> connector.setProperty("relaxedQueryChars", "[]")
		);

		return tomcatServlet ;
	}

}
